import React, {Component} from 'react';
import {Swiper} from 'antd-mobile';
import './index.css'

class Banner extends Component {
    render() {
        const {banners} = this.props;
        return (
            <div className={"swiper_wrapper"}>
                <Swiper autoplay indicatorProps={{
                    color: 'white',
                }}>
                    {banners.map((banner,index)=>{
                        return <Swiper.Item key={index}>
                            <div className={"item"}>
                                <img src={banner.imageUrl} />
                            </div>
                        </Swiper.Item>
                    })}
                </Swiper>
            </div>

        );
    }
}

export default Banner;

